//! @file   lc_system_exception.cpp
//! @brief  
//! @author Sayan Chaliha
//! @date   September, 2011
//!
//! 
#include <lc_system_exception.h>
#include <lc_system.h>

namespace cyan {
  SystemException::SystemException(Int errorNumber) throw() {
    this->errorCode_ = errorNumber;
    this->errorMessage_.formattedAssign("Error: %d; Message: %s", errorNumber,
        implicit_cast<const Char*>(System::errorMessage(errorNumber)));
  }

  SystemException::~SystemException() throw() {
  }

  const Char* SystemException::what() const throw() {
    return TEXT(this->errorMessage_.toCString());
  }

  Int SystemException::errorCode() const throw() {
    return this->errorCode_;
  }

  const Char* SystemException::errorMessage() const throw() {
    return this->errorMessage_.toCString();
  }
}
